On UNIX, there's no reason to spin on the select. Wait at least a character
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 1 Nov 2004 17:34:28 +0000 (17:34 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 1 Nov 2004 17:34:28 +0000 (17:34 +0000)
time before looking again.

gpsbabel/jeeps/gpsserial.c

index 1953500d2e6666905536aeaf9e8a38ecbe9f5aa7..b2a51bb22c46704437b0c452f21b1b639abb7429 100644 (file)
@@ -456,7 +456,7 @@ int32 GPS_Serial_Chars_Ready(int32 fd)
     FD_SET(fd,&rec);
 
     t.tv_sec  = 0;
-    t.tv_usec = 0;
+    t.tv_usec = 1000;
     (void) select(fd+1,&rec,NULL,NULL,&t);
     if(FD_ISSET(fd,&rec))
        return 1;